import { Modal } from "bootstrap"
export function openMessage(content="",title="") {
  const notifiedMessage = document.getElementById('notifiedMessage')
  notifiedMessage.addEventListener('show.bs.modal', ()=> {
    // 更新模态的内容。
    const modalTitle = notifiedMessage.querySelector('.modal-title')
    const modalBody = notifiedMessage.querySelector('.modal-body')

    modalTitle.textContent = `${title}`
    modalBody.innerHTML = `${content}`
  })

  let myModal = new Modal(document.getElementById('notifiedMessage'));
  myModal.show();
}
